package tool

import (
	"MoSkeleton/framework/core/models"
)

type GenDatasource struct {
	models.MoModel
	DatasourceName string `gorm:"column:datasource_name;type:VARCHAR(20);NOT NULL"`
	DatasourceType string `gorm:"column:datasource_type;type:VARCHAR(50);NOT NULL"`
	Url            string `gorm:"column:url;type:VARCHAR(2000);"`
	ServerAddr     string `gorm:"column:server_addr;type:VARCHAR(100);"`
	Port           int32  `gorm:"column:port;type:INT;"`
	DbName         string `gorm:"column:db_name;type:VARCHAR(100);"`
	DbParam        string `gorm:"column:db_param;type:VARCHAR(200);"`
	DbUsername     string `gorm:"column:db_username;type:VARCHAR(32);"`
	DbPasswd       string `gorm:"column:db_passwd;type:VARCHAR(100);"`
	ListOrder      int32  `gorm:"column:list_order;type:INT;NOT NULL"`
	Status         string `gorm:"column:status;type:CHAR(1);NOT NULL"`
	Remark         string `gorm:"column:remark;type:VARCHAR(500);"`
	CreatedBy      string `gorm:"column:created_by;type:VARCHAR(32);"`
	UpdatedBy      string `gorm:"column:updated_by;type:VARCHAR(32);"`
}

func (d *GenDatasource) TableName() string {
	return "gen_datasource"
}
